package com.leruan.aasimp.service.impl;

import java.util.List;

import com.leruan.aasimp.dao.ForumUserDao;
import com.leruan.aasimp.entity.Forumuser;
import com.leruan.aasimp.service.ForumUserService;

public class ForumUserServiceImpl implements ForumUserService {
    private ForumUserDao forumUserDao;

    public String getPassword(String username, String email) {
        System.out.println(111);
        return forumUserDao.findPassword(username, email);
    }

    public Forumuser getBoardUserById(String boardUserId) {
        return forumUserDao.findBoardUserById(boardUserId);
    }

    public Forumuser getForumUserByUsernameAndPassword(String username, String password) {
        return forumUserDao.findForumUserByUsernameAndPassword(username, password);
    }

    public void saveForumUser(Forumuser forumuser) {
        forumUserDao.insertForumUser(forumuser);
    }

    public ForumUserDao getForumUserDao() {
        return forumUserDao;
    }

    public void setForumUserDao(ForumUserDao forumUserDao) {
        this.forumUserDao = forumUserDao;
    }

    public Forumuser getForumUserByUsername(String username) {
        return forumUserDao.findForumUserByUsername(username);
    }

    public List<Forumuser> getForumUser(String username, Long state, int pageNo) {
        return forumUserDao.findForumUser(username, state, pageNo);
    }

    public Long getForumUserTotal(String username, Long state) {
        return forumUserDao.findForumUserTotal(username, state);
    }

    public void removeUser(Forumuser forumuser) {
        forumUserDao.deleteUser(forumuser);
    }

	public void modifyForunUser(Forumuser user) {
		forumUserDao.updateForunUser(user);
	}

}
